package com.ylink.lkx.util;

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.ylink.lkx.util.interceptor.CustomInterceptor;

/**
 * 配置加载
 * @author kangx
 *
 */
@SpringBootConfiguration
public class WebConfiguration implements WebMvcConfigurer {
	
	/**
	 * 注册一个拦截器 CustomInterceptor
	 * 测试结果，只拦截了访问路径，没有拦截  .do
	 */
	public void addInterceptors(InterceptorRegistry registry) {
		System.out.println("registry WebConfiguration");
		registry.addInterceptor(new CustomInterceptor());
	}
}
